<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.net.cluster.model.IChannel</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.net.cluster.model.IChannel");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461">tango.net.cluster.model.IChannel</a></h1>
                
<b>License:</b><br>
BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a><br><br>
<b>Version:</b><br>
July 2004: Initial release<br><br>
<b>author:</b><br>Kris<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>interface <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L30">IChannel</a></span>
<script>explorer.outline.addDecl('IChannel');</script>;</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">A channel represents something akin to a publish/subscribe topic, 
        or a radio station. These are used to segregate cluster operations
        into a set of groups, where each group is represented by a channel.
        Channel names are whatever you want then to be: use of dot notation 
        has proved useful in the past. See Client.createChannel</font><br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Logger <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L38">log</a></span>
<script>explorer.outline.addDecl('log');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return the Logger associated with this cluster</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>char[] <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L47">name</a></span>
<script>explorer.outline.addDecl('name');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return the name of this channel. This is the name provided
                when the channel was constructed.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>IConsumer <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L58">createConsumer</a></span>
<script>explorer.outline.addDecl('createConsumer');</script>(ChannelListener <span class="funcparam">notify</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Create a message listener on the given
                channel. The ChannelListener should be called whenever
                a corresponding cluster event happens. Note that the
                notification is expected to be on a seperate thread.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>IConsumer <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L69">createBulletinConsumer</a></span>
<script>explorer.outline.addDecl('createBulletinConsumer');</script>(ChannelListener <span class="funcparam">notify</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Create a bulletin listener on the given
                channel. The ChannelListener should be called whenever
                a corresponding cluster event happens. Note that the
                notification is expected to be on a seperate thread.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L78">putCache</a></span>
<script>explorer.outline.addDecl('putCache');</script>(char[] <span class="funcparam">key</span>, IMessage <span class="funcparam">message</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Place a cache entry into the cluster. If there is already
                a matching entry, it is replaced.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>IMessage <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L87">getCache</a></span>
<script>explorer.outline.addDecl('getCache');</script>(char[] <span class="funcparam">key</span>, bool <span class="funcparam">remove</span>, IMessage <span class="funcparam">host</span> = null);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return a cluster cache entry, and optionally remove it
                from the cluster.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L101">loadCache</a></span>
<script>explorer.outline.addDecl('loadCache');</script>(char[] <span class="funcparam">key</span>, IMessage <span class="funcparam">message</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Ask the cache host to load an entry, via the provided
                message. Note that the message itself should contain all 
                pertinent information to load the entry &#40;such as whatever
                key values are required&#41;. 
                
                The host executes the message in a manner akin to RPC, thus
                the message also needs to be registered with the host server</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>IMessage <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L111">putQueue</a></span>
<script>explorer.outline.addDecl('putQueue');</script>(IMessage <span class="funcparam">message</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Place a new entry into the cluster queue. This may throw
                a ClusterFullException when there is no space left within
                the cluster queues.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>IMessage <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L121">getQueue</a></span>
<script>explorer.outline.addDecl('getQueue');</script>(IMessage <span class="funcparam">host</span> = null);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Query the cluster for queued entries on our corresponding 
                channel. Removes, and returns, the first matching entry 
                from the cluster.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L130">broadcast</a></span>
<script>explorer.outline.addDecl('broadcast');</script>(IMessage <span class="funcparam">message</span> = null);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Scatter a message to all registered listeners. This is
                akin to multicast.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L139">execute</a></span>
<script>explorer.outline.addDecl('execute');</script>(IMessage <span class="funcparam">message</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Execute the provided message on the cluster, and return the
                results internally</font><br><br></dd></dl></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>interface <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L149">IEvent</a></span>
<script>explorer.outline.addDecl('IEvent');</script>;</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">An IEvent is passed as the argument to each ChannelListener callback</font><br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>IChannel <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L157">channel</a></span>
<script>explorer.outline.addDecl('channel');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return the channel used to initiate the listener</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>IMessage <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L166">get</a></span>
<script>explorer.outline.addDecl('get');</script>(IMessage <span class="funcparam">host</span> = null);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return one or more messages associated with this event, or
                null if there is nothing available</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L175">reply</a></span>
<script>explorer.outline.addDecl('reply');</script>(IChannel <span class="funcparam">channel</span>, IMessage <span class="funcparam">message</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Send a message back to the producer. This should support all
                the various event styles.                 </font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>IChannel <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L184">replyChannel</a></span>
<script>explorer.outline.addDecl('replyChannel');</script>(IMessage <span class="funcparam">message</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return an appropriate reply channel for the given message, 
                or return null if no reply is expected</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Logger <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L192">log</a></span>
<script>explorer.outline.addDecl('log');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return the Logger associated with this cluster</font><br><br></dd></dl></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>alias void delegate (IEvent event) <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/cluster/model/IChannel.d?rev=3461#L204">ChannelListener</a></span>
<script>explorer.outline.addDecl('ChannelListener');</script>;</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Declares the contract for listeners within the cluster package.
        When creating a listener, you provide a callback delegate matching
        this signature. The delegate is invoked, on a seperate thread, each
        time a relevant event occurs.</font><br><br></dd></dl></td></tr>
                <tr><td id="docfooter">
                        Copyright (c) 2004 Kris Bell. All rights reserved :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Jun  8 17:12:55 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>